package com.qf01;

public class TestRunable {
    public static void main(String[] args) {
//        MyRunnable runnable=new MyRunnable();
//        Thread thread=new Thread(runnable,"我的线程1");
//        thread.start();

        Runnable runnable = new Runnable() {

            public void run() {
                for (int i = 0; i <100 ; i++) {
                    System.out.println(Thread.currentThread().getName()+"......"+i);
                }
            }
        };
        Thread thread=new Thread(runnable,"我的线程1");
        thread.start();

        for (int i = 0; i < 50; i++) {
            System.out.println("main......." + "i");
        }
    }
}
